package hmac

import (
	"crypto/hmac"
	"crypto/sha1"
)

// HmacSha1 生成hmac-sha1摘要
func HmacSha1(data, key string, opts ...string) ([]byte, error) {
	hash := hmac.New(sha1.New, []byte(key))
	hash.Write([]byte(data))
	return hash.Sum(nil), nil
}
